package com.shaozj.demo.liteflow.controller;

import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.flow.LiteflowResponse;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LiteFlowController {

//    @Autowired
//    private FlowExecutor flowExecutor;
//
//    @GetMapping("/execute")
//    public String executeFlow() {
//        // 执行 exampleChain 流程
//        LiteflowResponse response = flowExecutor.execute2Resp("chain1", null);
//        if (response.isSuccess()) {
//            return "流程执行成功";
//        } else {
//            return "流程执行失败：" + response.getMessage();
//        }
//    }
}
